package com.example.szh.widget;

import android.content.Context;
import android.graphics.Color;

import androidx.annotation.Nullable;

import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;

public class HomeGrideDecoration extends Y_DividerItemDecoration {
    private Y_Divider divider;
    public HomeGrideDecoration(Context context) {
        super(context);
    }

    @Nullable
    @Override
    public Y_Divider getDivider(int itemPosition) {
        if (itemPosition>0){
            divider =new Y_DividerBuilder()
                    .setBottomSideLine(true, Color.GRAY, 1f, 0f, 0f)
                    .create();
        }

        return divider;
    }
}
